{% assign top = page.url | slice: 1, 3 %}

<nav class="navbar sticky-top navbar-expand-md navbar-dark">
    <div class="container">
        <a class="navbar-brand windowjs" href="/">
            <img src="/assets/logo.svg" width="44" height="44" alt="Window.js Logo">
            <span>Window.js</span>
        </a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarToggler" aria-controls="navbarToggler" aria-expanded="false"
            aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarToggler">
            <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                <li class="nav-item"><a href="/about" class="nav-link {% if top=="abo" %}top-selected{% endif %}">About</a></li>
                <li class="nav-item"><a href="/doc" class="nav-link {% if top=="doc" %}top-selected{% endif %}">Documentation</a></li>
                <li class="nav-item"><a href="/dev" class="nav-link {% if top=="dev" %}top-selected{% endif %}">Development</a></li>
                <li class="nav-item"><a href="/download" class="nav-link {% if top=="dow" %}top-selected{% endif %}">Download</a></li>
            </ul>
            <form class="d-flex">
                <a href="http://github.com/windowjs/windowjs" class="github-icon"><img src="https://cdnjs.cloudflare.com/ajax/libs/octicons/8.5.0/svg/mark-github.svg"></a>
            </form>
        </div>
    </div>
</nav>